package com.itasura.delegate;

/**
 * @author sailor wang
 * @date 2018/11/6 3:09 PM
 * @description
 */
public class Main {

    public static void main(String[] args) {
        BusinessLookup businessLookup = new BusinessLookup();

        businessLookup.setEjbService(new EjbService());
        businessLookup.setJmsService(new JmsService());

        BusinessDelegate delegate = new BusinessDelegate();
        delegate.setBusinessLookup(businessLookup);
        delegate.setServiceType(ServiceType.EJB);

        Client client = new Client(delegate);
        client.request();

        delegate.setServiceType(ServiceType.JMS);
        client.request();
    }
}